home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / Technical Documentation / Develop / develop Issue 26 / develop Issue 26 code / SOM and ListPart / ListPart DR4 / Source / ListPartVers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-08  |  3.8 KB  |  124 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ListPartVers.h
  3.  
  4.     Contains:    Version definitions used by ListPart.idl & .r files.
  5.  
  6.     Written by:    Steve Smith
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.     
  10.     Notes:
  11.  
  12.     There are three sets of version numbers you need to maintain.
  13.     The CFM version numbers in the 'cfrg' resource, the SOM
  14.     class version numbers in the IDL file, and the Finder file
  15.     version number.
  16.     
  17.     Fortuantely, all three version schemes require a "major" and "minor"
  18.     number to generate the release version. This makes things
  19.     easier, but not simple. SOM classes only use those two pieces,
  20.     while CFM and the Finder define "development stage" and
  21.     "prerelease" version; the "prerelease" version can basically be
  22.     ignored, but be forewarned that CFM will use them, if provided.
  23.     
  24.     In all cases, a version number can be defined as 3 digits seperated
  25.     by 2 periods. The "major" version number has a range of 0-99, while
  26.     the two minor version numbers have a range of 0-9. An example of
  27.     a version number is '2.3.1'. All digits in the version number are
  28.     represented in Binary-Coded-Decimal (BCD) format even though they
  29.     appear in hexadecimal. The above example version number is 0x0231
  30.     in hexadecimal (note that the 3 and the 1 are in the same byte).
  31.     
  32.     Below is a set of defines to generate the version numbers for
  33.     all three instances. This file should be included in your .r and
  34.     .idl file to keep your part versioning in sync.
  35.     
  36.     Each time you need to update the version of the part generated, you
  37.     should find the appropriate constants and change them.
  38.     
  39.     ** WARNING **: Each linker that you run will require the same numbers you
  40.     specify here. Be sure to update your project preferences, for
  41.     integrated environments, and your makefile for MPW to ensure the version
  42.     numbers are the same everywhere.
  43.     
  44.     For complete explanation of version numbers, read the:
  45.     1) Finder Interface Chapter, Inside Macintosh: Macintosh Toolbox Essentials.
  46.     2) Code Fragment Chapter (pg 3-7), Inside Macintosh: PowerPC System Software
  47.     3) SOM Developer's Guide
  48.  
  49. */
  50.  
  51.  
  52. #ifndef _LISTPARTVERS_
  53. #define _LISTPARTVERS_
  54.  
  55.  
  56.  
  57. // • Stuff •
  58.  
  59. // Development Stages
  60. #define dsUndefined        0x00
  61. #define dsPreAlpha        0x20
  62. #define dsAlpha            0x40
  63. #define dsBeta            0x60
  64. #define dsFinal            0x80
  65. #define dsReleased        dsFinal
  66. #define dsGoldenMaster    dsFinal
  67.  
  68.  
  69. // • Change Often •
  70.  
  71. // Current Major Version (version = major.minor.fix)
  72. // Note:this number is not hex because the value is used
  73. //        in the IDL file and hex is not legal.
  74. #define currentMajorVersion        1
  75.  
  76. // Current Minor Version (version = major.minor.fix)
  77. // Note:this number is not hex because the value is used
  78. //        in the IDL file and hex is not legal.
  79. #define currentMinorVersion        0
  80.  
  81. // Current Fix Version (version = major.minor.fix)
  82. #define currentFixVersion        0x00
  83.  
  84. // Development Stage
  85. #define developmentStage        dsFinal
  86.  
  87. // Pre-release Number
  88. #define preReleaseNumber        0x00
  89.  
  90. // Short version string
  91. #define shortVersionStr            "1.0"
  92.  
  93.  
  94.  
  95. // • Change Seldom •
  96.  
  97. // Old Compatibility Definition Major Version (for CFM only)
  98. #define oldCompDefnMajorVersion    0x00
  99.  
  100. // Old Compatibility Definition Minor Version (for CFM only)
  101. #define oldCompDefnMinorVersion    0x00
  102.  
  103. // Old Compatibility Definition Fix Version (for CFM only)
  104. #define oldCompDefnFixVersion    0x00
  105.  
  106. // Pre-release Number
  107. #define oldCompDefnPreRelNumber    0x00
  108.  
  109. // Development Stage
  110. #define oldCompDefnDevStage        dsUndefined
  111.  
  112.  
  113.  
  114. // • Generated Version Numbers •
  115. //       (Don't Change!!)
  116.  
  117. #define currentVersion    (currentMajorVersion<<24)+(currentMinorVersion<<20)+(currentFixVersion<<16)    \
  118.                         +(developmentStage<<8)+preReleaseNumber
  119. #define compatibleVersion    (oldCompDefnMajorVersion<<24)+(oldCompDefnMinorVersion<<20)    \
  120.                             +(oldCompDefnFixVersion<<16)+(oldCompDefnDevStage<<8)+oldCompDefnPreRelNumber
  121. #define finderMinorVersion    (currentMinorVersion<<4)+(currentFixVersion<<0)
  122.  
  123. #endif // _LISTPARTVERSION_
  124.